Consider a house filled with air of a monatomic ideal gas, shared with the surrounding atmosphere, so that PV = NkT can model the house air. The gas energy is E = (3/2)NkT. If I turn on a furnace I increase the temperature T of the room air. Since P and V do not change values, N must decrease in value. Air molecules have left the house with ALL of the added thermal energy. The room air energy has not changed. The energy per molecule has increased, but N has decreased. We have heated the outside atmosphere! (Of course we have also heated the furniture.)